<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><s:text name="context.title"/></title>
<%@ include file="/common/meta.jsp"%>
<link href="${ctx }/js/artDialog/artDialog.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx }/js/artDialog/artDialog.js"></script>
<script type="text/javascript">

          var pageTotalPages = "1";
          var pageNo = "";
        $(document).ready(function() {
        	var pageTotalPages = $("#pageTotalPages").val();
            var pageNo = $("#pageNo").val();
            $("#pager").pager({ pagenumber: pageNo, pagecount: pageTotalPages, buttonClickCallback: PageClick });
        });

        PageClick = function(pageclickednumber) {
            $("#pager").pager({ pagenumber: pageclickednumber, pagecount: pageTotalPages, buttonClickCallback: PageClick });
           // $("#result").html("Clicked Page " + pageclickednumber);
            jumpPage(pageclickednumber);
        }

        function checkss(obj){
			if(obj.checked){
				$("#contentTables").find("input[type=checkbox]").attr("checked","checked");
			}else{
				$("#contentTables").find("input[type=checkbox]").removeAttr("checked")
			}

        }
        
        function confirmFun(){
        	art.dialog({
        		content:$("#multMsgDiv").html(),
        		title:"输入审核信息",
        		button:[
        			{
        				name : "提交",
        				callback : function(){
        					if(confirm("确定提交选中的科题？")){
								$("#sub").trigger("click");
								$("#subButton").attr("disabled","disabled");
        					}
        				}
        			},
        			{
        				name : "取消",
        				callback : function(){
        				}
        			}
        		],
        		lock :true
        	});
        }
    </script>
</head>
<body>
<form action="group-audit.action" method="post" id="mainForm">
<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
<input type="hidden" name="page.order" id="order" value="${page.order}"/>
<input type="hidden" id="pageTotalPages"  value="${page.totalPages}"/>
<br/>
<p align="center"><s:actionmessage theme="mytheme" cssClass="actionMessage"/></p>
<h1 class="title01"><img src="${ctx}/images/02_15.gif" width="45" height="42" class="fl"/>团队主任审核立题
</h1>
<fieldset class="fs_ys" style="width: 800px">
<legend>查询</legend>
<table align="center" id="contentTable" class="table_ys_input" >
	<tr>
		<td nowrap>教师姓名&nbsp;</td>
		<td><input type="text" name="teacher" value="${teacher }"/>&nbsp;</td>
		<td nowrap>审阅状态&nbsp;</td>
		<td colspan="">
			<select name="stauts">
				<option value="">请选择</option>
				<option value="11">待评阅</option>
				<option value="12">评阅通过</option>
				<option value="-11">评阅未通过</option>
				<option value="12">审核通过</option>
			</select>
			<script type="text/javascript">
				document.all('stauts').value='${stauts}';
			</script>
		</td>
		
		
	
		<td nowrap>团队&nbsp;</td>
		<td colspan=""><input type="text" name="group" value="${group }"/></td>
		<td colspan=""><input type="submit"  value="     查询 "/></td>
	</tr>
</table>
</fieldset>
<s:if test="page.totalCount != 0">
<table id="contentTables" class="table_ys tableColor">
	<tr>
		<th nowrap="nowrap" colspan="">序号</th>
		<th nowrap="nowrap"><input onclick="checkss(this)" type="checkbox" /></th>
		<th nowrap="nowrap">题目</th>
		<th nowrap="nowrap"><a href="javascript:sort('teacher_name','asc')">题目申报人</a></th>
		<th nowrap="nowrap"><a href="javascript:sort('set_the_time','asc')">立题时间</a></th>
		<th nowrap="nowrap">评阅状态</th>
		<th nowrap="nowrap">院系状态</th>
		<th nowrap="nowrap">操作</th>
	</tr>
	<s:iterator value="page.result" var="v" status="st">
	<tr>
		<td>${st.index + 1 }&nbsp;</td>
		<td><s:if test="#v.THESIS_STATUS < 13"><input type="checkbox" name="checkedIds" value="${v.id }"/></s:if>&nbsp;</td>
		<td><a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="group-audit!input?id=${v.id }">${v.titile }</a>&nbsp;</td>
		<td>${v.teacher_name }&nbsp;</td>
		<td><s:date format="yyyy年MM月dd日" name="#v.set_the_time"/>&nbsp;</td>
		<td>
			<s:if test="#v.THESIS_STATUS >= 12">已评阅</s:if>
			<s:else>待评阅</s:else>
		&nbsp;</td>
		<td>
			<s:if test="#v.THESIS_STATUS >= 15">已审核</s:if>
			<s:else>待评阅</s:else>
		&nbsp;</td>
		<td>
			<tc:timeControler authName="立 题">
			<s:if test="#v.THESIS_STATUS < 13"><a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="group-audit!input?id=${v.id }&flag=1">审核</a>、<a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="group-audit!back?id=${v.id }">退回</a></s:if>
			<s:else>审核、退回</s:else>
			</tc:timeControler>
		&nbsp;</td>
	</tr>
	</s:iterator>
	<tr>
		<td colspan="8">
		<tc:timeControler authName="立 题">
		<security:authorize ifAnyGranted="ROLE_团队负责人">
			<input type="submit" style="display: none;" name="method:multSavePingshen" id="sub" onclick="" value="  批量审核"/>
		 	<center><input type="button" name="method:multSavePingshen" id="subButton" onclick="confirmFun()" value="  批量审核"/></center>
			</security:authorize>
		</tc:timeControler>
		&nbsp;</td>
	</tr>
</table>
<div id="multMsgDiv" style="display: none;">
	<textarea rows="10" cols="30" id="multMsg" name="multMsg"></textarea>
</div>
<div align="center" id="pager" ></div>
</s:if>
</form>
</body>

</html>